<template>
	<view class="warp">
		<!-- <u-navbar :is-back="false" title="　" :border-bottom="false">
			<view class="u-flex u-row-right" style="width: 100%;">
				<view class="camera u-flex u-row-center">
					<u-icon name="camera-fill" color="#000000" size="48"></u-icon>
				</view>
			</view>
		</u-navbar> -->
		<view class="u-flex user-box u-p-t-30 u-p-l-30 u-p-r-20 u-p-b-30">
			<view class="u-m-r-10">
				<u-avatar :src="pic" size="140"></u-avatar>
			</view>
			<view class="u-flex-1">
				<view class="u-font-18 u-p-b-20">东邪西毒</view>
				<view class="u-font-14 u-tips-color">
					<text>消防大队长</text>
					<text class="userMark green">执勤中</text>
					<text class="userMark gray">请假中</text>
				</view>
			</view>
			<view class="u-m-l-10 u-p-10">
				<u-icon name="scan" color="#969799" size="28"></u-icon>
			</view>
			<view class="u-m-l-10 u-p-10">
				<u-icon name="arrow-right" color="#969799" size="28"></u-icon>
			</view>
		</view>
		
		<!-- <view class="u-m-t-20">
			<u-cell-group>
				<u-cell-item icon="rmb-circle" title="支付"></u-cell-item>
			</u-cell-group>
		</view> -->
		
		<view class="u-m-t-20">
			<u-cell-group>
				<u-cell-item icon="star" title="自测" @click="openPage('pages/workbench/learning/health/question')"></u-cell-item>
				<!-- <u-cell-item icon="coupon" title="卡券"></u-cell-item> -->
				<u-cell-item icon="heart" title="我的学习" @click="openPage('pages/myCenter/learnList')"></u-cell-item>
			</u-cell-group>
		</view>
		
		<view class="u-m-t-20">
			<u-cell-group>
				<u-cell-item icon="setting" title="设置"></u-cell-item>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pic:'https://uviewui.com/common/logo.png',
				show:true
			}
		},
		onLoad() {
			// uni.setNavigationBarTitle({
			// 	title:'我的'
			// })
		},
		methods: {
			//页面跳转
			openPage(url) {
				this.$u.route({
					url: url
				});
			},
		}
	}
</script>

<style lang="scss">

.warp{
	height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
	background-color: rgb(240, 242, 244);
}
.camera{
	width: 54px;
	height: 44px;
	
	&:active{
		background-color: #ededed;
	}
}
.user-box{
	background-color: #fff;
}
.userMark{
	display: inline-block;
	margin-left:20rpx;
	padding:6rpx 10rpx;
	font-size:20rpx;
	border-radius: 0.2em;
	&.green{
		background: #18B566;
		color:#fff;
	}
	&.gray{
		background: #E7E7E7;
		color:#999;
	}
	&.red{
		background: #FA3534;
		color:#fff;
	}
}
</style>
